import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout.vue'
import User from '@/views/user.vue'
import HomePage from '@/views/HomePage.vue'
import Information from '@/views/information.vue'
import LookingRoom from '@/views/LookingRoom.vue'
import CityList from '@/views/CityList.vue'
const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/homepage',
    children: [
      { path: 'homepage', component: HomePage },
      { path: 'information', component: Information },
      { path: 'user', component: User },
      { path: 'lookingRoom', component: LookingRoom }
    ]
  },
  { path: '/citylist', component: CityList }
]
Vue.use(VueRouter)

const router = new VueRouter({
  routes
})

export default router
